#version 330 core

precision mediump int;
precision highp float;

in vec2 VertTexcoord;

uniform vec4 uModulateColor = vec4(1.0, 1.0, 1.0, 1.0);
uniform float Alpha = 1.0;

out vec4 FragColor;

void main()
{
	vec4 whiteColor = vec4(1.0, 1.0, 1.0, 1.0) * (1.0 - VertTexcoord.x) * VertTexcoord.y;
	vec4 xColor = vec4(uModulateColor * VertTexcoord.y);
	vec4 yColor = vec4(whiteColor - xColor) * (1.0 - VertTexcoord.x);
	FragColor = xColor + yColor;
	FragColor.a = Alpha;
}
